<!--{if $webglobal[mode]=='indexhead'}-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={$webconfig[webcharset]}" />
<title>管理中心</title>
<style type="text/css">
body {
	background: #287EC7 url({ADMIN_WEBURLPATH}/images/headbg.gif) repeat-x;
	padding: 0;
	margin: 0;
	font-size: 12px;
	font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;
}
a {
	outline: none;
}

#maindiv {
	height: 60px;
	background: url({ADMIN_WEBURLPATH}/images/headpic.gif) no-repeat 0 100%;
}
#showinfo {
	float: right;
	padding: 28px 20px 0 0;
	color: #fff;
}
#showinfo a {
	color: #fff;
}
</style>
</head>
<body oncontextmenu="self.event.returnValue=false" onselectstart="self.event.returnValue=false" ondragstart="self.event.returnValue=false">

<div id="maindiv">
	<div id="showinfo">
		您好，{$user[adminusername]}：&nbsp;
		<a href="{ADMIN_WEBURLPATH}/index.php?mode=myinfo" target="indexmain">修改密码</a>&nbsp;|&nbsp;
		<a href="{WEBURLPATH}/" target="_blank">网站首页</a>&nbsp;|&nbsp;
		<a href="{ADMIN_WEBURLPATH}/index.php?mode=exit" target="_top">退出管理</a>
	</div>
</div>

</body>
</html>

<!--{elseif $webglobal[mode]=='indexleft'}-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={$webconfig[webcharset]}" />
<title>管理中心</title>
<style type="text/css">
html {
	height: 100%;
}
body {
	background-color: #fff;
	padding: 0 0 0 12px;
	margin: 0;
	height: 100%;
	font-size: 12px;
	font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;
}
#menuroot {
	height: 100%;
	overflow: auto;
}
#menuroot dl {
	border: 1px solid #D4D0C8;
	margin: 12px 0 0 0;
}
#menuroot dl dt {
	background-color: #D4D0C8;
	padding: 1px;
}
#menuroot dl dt a {
	display: block;
	color: #000;
	text-decoration: none;
	font-weight: 700;
	padding: 3px 3px 3px 9px;
}
#menuroot dl dt a img {
	border: 1px solid #D4D0C8;
	float: right;
}
#menuroot dl dt a:hover {
	color: #000000;
}
#menuroot dl dt a:hover img {
	border-top: 1px solid #fff;
	border-right: 1px solid #808080;
	border-bottom: 1px solid #808080;
	border-left: 1px solid #fff;
}
#menuroot dl dd {
	clear: left;
	background-color: #fff;
	margin: 0;
	padding: 5px;
	display: none;
}
#menuroot dl dd ul {
	padding: 0;
	margin: 0 0 0 20px;
}
#menuroot dl dd ul li {
	height: 20px;
	line-height: 20px;
}
#menuroot dl dd ul li a {
	color: #000;
	text-decoration: none;
}
#menuroot dl dd ul li a:hover {
	text-decoration: underline;
}
</style>
<script type="text/javascript">
<!--
	var closeStatus = Array("none", "open.gif", "打开菜单");
	var openStatus = Array("block", "close.gif", "关闭菜单");

	//切换全部菜单
	function SwitchAllMenu()
	{
		if (document.getElementById)
		{
			var strStatus = arguments[0] ? arguments[0] : 'auto';
			var ddobj = document.getElementById("menuroot").getElementsByTagName("dd");
			var imobj = document.getElementById("menuroot").getElementsByTagName("img");
			var ddobjlen = ddobj.length;
			var imobjlen = imobj.length;

			if (strStatus == "close")
			{
				var curSetting = closeStatus;
			}
			else if (strStatus == "open")
			{
				var curSetting = openStatus;
			}
			else
			{
				var isopen = 0;
				for (var i=0; i<ddobjlen; i++)
				{
					if (ddobj[i].style.display == openStatus[0])
					{
						isopen = 1;
						break;
					}
				}
				var curSetting = (isopen==1) ? closeStatus : openStatus;
			}

			for (var i=0; i<ddobjlen; i++)
			{
				ddobj[i].style.display = curSetting[0];
			}
			for (var j=0; j<imobjlen; j++)
			{
				imobj[j].src = "{ADMIN_WEBURLPATH}/images/"+curSetting[1];
				imobj[j].title = curSetting[2];
			}
		}
	}

	//切换单个菜单
	function SwitchMenu(obj)
	{
		if (document.getElementById)
		{
			var ddobj = document.getElementById(obj).getElementsByTagName("dd");
			var imobj = document.getElementById(obj).getElementsByTagName("img");
			if (ddobj.length>0 && imobj.length>0)
			{
				var curSetting = (ddobj[0].style.display != openStatus[0]) ? openStatus : closeStatus;
				ddobj[0].style.display = curSetting[0];
				imobj[0].src = "{ADMIN_WEBURLPATH}/images/"+curSetting[1];
				imobj[0].title = curSetting[2];
			}
		}
	}

	//document.ondblclick = SwitchAllMenu;
//-->
</script>
<base target="indexmain" />
</head>
<body onselectstart="self.event.returnValue=false" ondragstart="self.event.returnValue=false">

<div id="menuroot">
		<!--{loop $webglobal[file_index][indexMenuData] $menukey  $menuvalue}-->
		<dl id="sub{$menukey}">
			<dt>
				<a href="javascript:void(null);" onclick="SwitchMenu('sub{$menukey}')"><img src="{ADMIN_WEBURLPATH}/images/open.gif" alt="" title="打开菜单" />{$menuvalue[name]}</a>
			</dt>
			<dd>
				<!--{if $menuvalue[modeshow]}-->
				<ul>
				<!--{loop $menuvalue[modeshow] $modekey $modevalue}-->
				<li><a href="{ADMIN_WEBURLPATH}/index.php?{$modevalue[url]}">{$modevalue[name]}</a></li>
				<!--{/loop}-->
				</ul>
				<!--{/if}-->
			</dd>
		</dl>
		<!--{/loop}-->
	<!--{if $user[adminusername]==$webconfig[superadmin]}-->
		
	<!--{/if}-->
</div>

<script type="text/javascript">
<!--
	SwitchAllMenu();
	
//-->
</script>

</body>
</html>

<!--{elseif $webglobal[mode]=='indexmain'}-->

{template header}
<table class="datatable" cellspacing="1">
	<thead>
		<tr><td colspan="2">系统信息</td></tr>
	</thead>
	<tbody>
		<tr>
			<th>服务器时间</th>
			<td>$webserver[showtime]</td>
		</tr>
		<!--{if !empty($webserver[serverip])}-->
		<tr>
			<th>服务器IP地址</th>
			<td>$webserver[serverip]</td>
		</tr>
		<!--{/if}-->
		<tr>
			<th>操作系统及 PHP</th>
			<td>$webserver[serverinfo]</td>
		</tr>
		<tr>
			<th>MySQL 版本</th>
			<td>$webserver[dbversion]</td>
		</tr>
		<tr>
			<th>上传许可</th>
			<td>$webserver[fileupload]</td>
		</tr>
		<tr>
			<th>当前数据库尺寸</th>
			<td>$webserver[dbsize]</td>
		</tr>
	</tbody>
</table>
{template footer}

<!--{else}-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={$webconfig[webcharset]}" />
<title>管理中心</title>
</head>
<frameset id="indexframe" name="indexframe" rows="60,*" border="0" frameborder="0" framespacing="0">
	<frame id="indextop" name="indextop" target="indexmain" scrolling="no" noresize="noresize" src="{ADMIN_WEBURLPATH}/index.php?mode=indexhead" marginwidth="0" marginheight="0" />
	<frameset id="mainframe" name="mainframe" cols="195,*" border="0" frameborder="0" framespacing="0">
		<frame id="indexleft" name="indexleft" target="indexmain" scrolling="no" noresize="noresize" src="{ADMIN_WEBURLPATH}/index.php?mode=indexleft" marginwidth="0" marginheight="0" />
		<frame id="indexmain" name="indexmain" scrolling="auto" src="{$webglobal[file_index][varindexmain]}" marginwidth="0" marginheight="0" />
	</frameset>
	<noframes>
		<body>
			<p>管理中心使用了框架，但您的浏览器不支持框架。</p>
		</body>
	</noframes>
</frameset>
</html>

<!--{/if}-->
